<template>
	<view class="width:750rpx;height:100vh;background:linear-gradient(to top, #DCE5FF,#C3B0FF)">
		<image src="../../static/rankbg.png" mode="widthFix" style="width: 100%;"></image>

		<view class="u-flex u-row-around" style="position: absolute;top: 200rpx;width: 100%;padding: 0 20rpx;">


			<view v-if="index==1" v-for="(item,index) in list" :key='index' class=" "
				style="position: relative;top:80rpx;transform: scale(0.8);">
				<view class=" u-row-center" style="text-align: center;">
					<image :src="item.headimg" style="width:160rpx;border-radius: 100%;height: 160rpx;"></image>
					<view class="u-font-weight u-font-16">{{item.nickname}}</view>
					<view class="u-font-weight">{{item.timeLong}}h</view>
				</view>
			</view>
			<view v-if="index==0" v-for="(item,index) in list" :key='index' class=" " style="">
				<view class=" u-row-center" style="text-align: center;">
					<image :src="item.headimg" style="width:160rpx;border-radius: 100%;height: 160rpx;"></image>
					<view class="u-font-weight u-font-16">{{item.nickname}}</view>
					<view class="u-font-weight">{{item.timeLong}}h</view>
				</view>
			</view>
			<view v-if="index==2" v-for="(item,index) in list" :key='index' class=" "
				style="position: relative;top:120rpx;transform: scale(0.8);">
				<view class=" u-row-center" style="text-align: center;">
					<image :src="item.headimg" style="width:160rpx;border-radius: 100%;height: 160rpx;"></image>
					<view class="u-font-weight u-font-16">{{item.nickname}}</view>
					<view class="u-font-weight">{{item.timeLong}}h</view>
				</view>
			</view>



		</view>
		<view class="u-padding-20">
			<view v-if="index>3" v-for="(item,index) in list" :key='index' class="u-flex u-row-between">
			
					<view class="u-flex">
						<view class="u-font-weight u-margin-right-20">{{index+1}}</view>
						<image :src="item.headimg" style="width:100rpx;border-radius: 100%;height: 100rpx;"></image>
						<view class="u-font-weight u-font-16 u-margin-left-20">{{item.nickname}}</view>
					</view>
					<view class="u-font-weight">{{item.timeLong}}h</view>
			
			</view>
		</view>
		
	</view>
</template>

<script>
	import loader from '@/common/loadPage.js';
	export default {
		mixins: [loader],
		data() {
			return {
				info: '',
				list: [],
				initial: {
					geturl: "/alliance/timeRank",
					parm: {

					},
					isPage: true
				},
			}

		},
		methods: {
			getUser() {
				this.$u.api.userInfo().then(res => {
					this.info = res;
				})
			},
		},
		onShow() {
			this.getGoods();
			this.getUser()
		}
	}
</script>

<style>
</style>